package Review06;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Student> arr = new ArrayList();
        Student stu1 = new Student("001","001",100);
        Student stu2 = new Student("002","002",100);
        Student stu3 = new Student("003","003",100);
        Student stu4 = new Student("004","004",100);
        Student stu5 = new Student("005","005",100);

        arr.add(stu1);
        arr.add(stu2);
        arr.add(stu3);
        arr.add(3,stu1);
        arr.add(stu4);
        arr.add(stu5);
        for (int i = 0; i < arr.size(); i++) {
            Student student =  arr.get(i);
            System.out.println(student);
        }
        arr.remove(stu3);
        System.out.println(arr.contains(stu3));
        //集合适用于引用类型，要使用数据类型需要转换
        //自动装箱 基本数据类型转换成引用类型
        Integer integer = 10;
        //拆箱 把引用数据类型转换成基本数据类型
        Integer integer1  = new Integer(10);
        int num = integer1.intValue();

        stu1.test(1,2,3,4);
        stu1.sex = MeiJu.Female;
    }
}
